package com.rainxing.cockpit.constant;

import lombok.Getter;

/**
 * @Auther: ybzhu
 * @Date: 2018/8/20 15:25
 * @Description:
 */
@Getter
public enum CaseEightEnums {
    case1("1", "店外经营堆物堆料"),
    case2("2", "白色垃圾生活垃圾"),
    case3("3", "露天烧烤大排档"),
    case4("4", "无照经营"),
    case5("5", "非法小广告"),
    case6("6", "户外广告及牌匾"),
    case7("7", "停车场及地锁"),
    case8("8", "施工现场泄露遗撒"),
    case9("9", "大气环保"),
    case10("10", "违法建设");
    private String id;
    private String text;

    CaseEightEnums(String id, String text) {
        this.id = id;
        this.text = text;
    }

    public static String getString(String id) {
        String result = null;
        for (CaseEightEnums c : CaseEightEnums.values()) {
            if (c.getId().equals(id)) {
                String message = c.getText();
                result = message;
                break;
            }
        }
        return result;
    }

    public static String getNote(String note) {
        String result = null;
        for (CaseEightEnums c : CaseEightEnums.values()) {
            if (c.getText().equals(note)) {
                String message = c.getId();
                result = message;
                break;
            }
        }
        return result;
    }

    public static void main(String[] args) {
        System.out.println(CaseEightEnums.getString("7"));
        System.out.println(CaseEightEnums.getNote("施工现场泄露遗撒"));
    }
}
